﻿using System;
using System.Collections.Generic;
using System.Text;

namespace CO2FixCalibration
{
    public static class CohortNames
    {
        public static int GetIndex(string name)
        {
            int c =0;
            foreach (string cohortname in Enum.GetNames(typeof(CohortNames.Names)))
            { 
                if(cohortname == name)return c;
                c++;
            }
            throw new System.Exception("Godverdomme");
        }
        public static string[] GetNames
        {
            get
            {
                 List<string> names = new List<string>();
                 Array A = Enum.GetValues(typeof(CohortNames.Names));
                 foreach (CohortNames.Names name in A)
                 {
                     names.Add(name.ToString());
                 }
                 return names.ToArray();
            }
        }
        public enum Names
        {
            CommercialDipterocarps,
            CommercialAgathis,
            Emergents,
            ClimaxUpperCanopy,
            PioneerUpperCanopy,
            Understory
        }
    }
}
